package com._file;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.FileSystemException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;

/**
 * @author huangya
 * @date 2023/2/21
 */
public class PathDemo {

    public static void main(String[] args) throws IOException {
        Path tempDirectory = Files.createTempDirectory("test");
        Path file = tempDirectory.resolve("README.md");

        Files.write(file, Collections.singletonList("Read me to know more"), Charset.forName("UTF-8"));

        System.out.println(11111);


//        Path file = base.resolve(name);
//        Path javaFile = base.resolve("HelloWorld.java");
//        Path classes = Files.createDirectories(base.resolve("classes"));
    }


}
